package routes

import (
	"github.com/gin-gonic/gin"
	"mon-go-web/internal/controllers"
	"mon-go-web/internal/models"
	"mon-go-web/pkg/bind"
)

func SetupUserRoutes(r *gin.Engine) {
	userCtrl := controllers.NewUserController()
	userGroup := r.Group("/users")
	{
		bind.Post[models.User](userGroup, "/add", userCtrl.Create)
		bind.Get[models.User](userGroup, "/query", userCtrl.GetByQuery)
		bind.Post[models.User](userGroup, "/login", userCtrl.Login)
	}
}
